<template>
    <div class="backbtn">
        <el-affix :offset="0">
            <div :style="`background-color:${prop.bgColor}; height: 40px`">
                <!-- <img src="@/assets/icon/back.png" class="back" alt="" @click="back" /> -->
                <el-icon @click="back" class="back" size="22" color="#f11f1">
                    <ArrowLeftBold />
                </el-icon>
            </div>
        </el-affix>
    </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";
const prop = defineProps({
    bgColor: {
        type: String,
        default: "#fff"
    }
})
const router = useRouter();
// 返回
function back() {
    router.go(-1);
}
</script>
<style lang="scss">
.back {
    // position: absolute;
    width: 25px;
    margin: 10px 0 0 40px;
    cursor: pointer;
}
</style>